package io.gitee.yth.design.pattern.test.core.pattern.structural.proxy.staticProxy;

import io.gitee.yth.design.pattern.test.core.pattern.structural.proxy.ITeacherDao;

/**
 * @author yth
 * @since 2023-04-27-23:22
 */
public class TeacherDaoProxy implements ITeacherDao {

    private final ITeacherDao teachDao;

    public TeacherDaoProxy(ITeacherDao teachDao) {
        this.teachDao = teachDao;
    }

    @Override
    public void teach() {
        System.out.println("proxy begin ...");
        teachDao.teach();
        System.out.println("proxy end ...");
    }

}
